﻿/*
 * Copyright © 2020, Wuxi Safover Intelligent Technology Co., Ltd. All rights reserved.
 * 
 * 无锡安永智能科技有限公司版权所有，未经许可，不得用于商业用途
 * 
 * Visit: https://www.safover.com/ 
 */

using System;

namespace Safover.LidarCollector.Core
{
    public class SerialPortStatusChangedEventArgs : EventArgs
    {
        public bool IsSerialPortWorkable { get; }
        public string Message { get; }
        public string DeviceType { get; }

        public SerialPortStatusChangedEventArgs(string deviceType, bool isSerialPortWorkable, string message)
        {
            IsSerialPortWorkable = isSerialPortWorkable;

            Message = message;

            DeviceType = deviceType;
        }

        public override string ToString()
        {
            return $"{DeviceType}: Is Workable=[{IsSerialPortWorkable}], {Message}.";
        }
    }
}